package business;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import service.PanduanService;
import service.PanduanServiceImpl;
import struts.Action;
import struts.form.ActionForm;
import vo.MessageVO;

public class PendAction implements Action {

	@Override
	public String execute(HttpServletRequest request,
			ActionForm form, Map<String, String> actionForward) {
		String url = "";
		PanduanService panduanService = new PanduanServiceImpl();
		Map<String, MessageVO> map = panduanService.getVO(request.getParameter("text"));
		if(map.containsKey("url"))
		{
			MessageVO messageVO = map.get("url");
			request.setAttribute("mess", messageVO);
		}
		
		return url;
	}


}
